|
|
 |
|
|
|
|
36:
37: Start the animation
38: frmStatus.anmShowAction.Play
39:
40: This routine loops until the entire file is copied
41: For intLoopCtr = 1 To intBufferCount + 1
42: Get #1, , strInByte
43: Put #2, , strInByte
44:
45: change progressbar value to indicate the status of
46: the copy function
47: frmStatus.prgStatus.Value = intLoopCtr
48:
49: the DoEvents command allows Windows to update
50: the controls on the form
51: DoEvents
52: Next intLoopCtr
53:
54: After the copy is complete close both files
55: Close #1 Close file.
56: Close #2 Close file.
57:
58: If the function is a move, erase the source file
59: If FileAction = ActionMove Then
60: Kill txtSourceFile.Text
61: End If
62:
63: Stop the animation and make all related controls
64: invisible
65: frmStatus.anmShowAction.Stop
66: frmStatus.Hide
67:
68: End Sub |
|
|
|
|
|
|
|
|
The remaining code controls the action whenever any of the command buttons are clicked. When creating the frmDialog form, the names of the controls should match those in Table 2.1. |
|
|
|
|
| TABLE 2.1. NAME PROPERTIES FOR THEfrmDialogCONTROLS. | | Control | Name | Caption | | Common Dialog | dlgFileSelect | | | TextBox | txtSourceFile | | | TextBox | txtTargetFile | | | Command Button | cmdClose | Close | | | |
|
|
|